package model;

/**
 * Book.java
 * Purpose: This class represent a book object
 * 
 * @author Hans Brems
 * @version 1.0 03/11/2011
 */

public class Book extends Product {
	/* Author of the book */
	String author;
	/* Title of the book */
	String title;
	/* Genre of the book */
	String genre;
	
	/** Constructs a new book */
	public Book() {
	}

	/** Constructs a new book */
	public Book(int productID) {
		this.productID = productID;
	}

	/** Constructs a new book */
	public Book(int productID, String author, String title, String genre) {
		this.productID = productID;
		this.author = author;
		this.title = title;
		this.genre = genre;
	}
	
	/** Returns the author of the book */
	public String getAuthor() {
		return this.author;
	}

	/** Sets the author of the book */
	public void setAuthor(String author) {
		this.author = author;
	}

	/** Returns the title of the book */
	public String getTitle() {
		return this.title;
	}

	/** Sets the title of the book */
	public void setTitle(String title) {
		this.title = title;
	}

	/** Returns the genre of the book */
	public String getGenre() {
		return this.genre;
	}

	/** Sets the genre of the book */
	public void setGenre(String genre) {
		this.genre = genre;
	}

	/** Returns a string representation of the book */
	@Override
	public String toString() {
		return this.title + " by " + this.author;
	}
}